<template>
  <div class="flex m-10">
    <draggable class="dragArea list-group w-full" :list="hello" @change="log">
      <div
        class="list-group-item bg-gray-300 m-1 p-3 rounded-md text-center"
        v-for="element in hello"
        :key="element.name"
      >
        {{ element.name }}
      </div>
    </draggable>
  </div>
</template>
<script>
  import { VueDraggableNext } from 'vue-draggable-next'
  export default {
    components: {
      draggable: VueDraggableNext,
    },
    data() {
      return {
        enabled: true,
        hello: [
          { name: 'John', id: 1 },
          { name: 'Joao', id: 2 },
          { name: 'Jean', id: 3 },
          { name: 'Gerard', id: 4 },
        ],
        dragging: false,
      }
    },
    methods: {
      log() {
        console.log('yes')
      },
    },
  }
</script>
